import request from "."

/**
 * 登录请求JSON
 */
type UserLoginRequest = {
    phone: string,
    password: string,
}

export const UserLogin = (data: UserLoginRequest) => {
    return request<UserBaseInfo>({
        url: '/user/login',
        method: 'POST',
        data
    })
}

/**
 * 验证码登录请求JSON
 */
type UserRegisterRequest = {
    phone: string,
    password: string
}

export const UserRegister = (data: UserRegisterRequest) => {
    return request<UserBaseInfo>({
        url: '/user/verify',
        method: 'POST',
        data
    })
}